import { Grid } from 'antd';
import React, { useState, useEffect } from 'react';
import Mtable from './mtable';
import Mcard from './mcard';

const { useBreakpoint } = Grid;

function AutoTable(props) {
  const { md } = useBreakpoint();

  return (
    md ?
      <Mtable {...props} />
      : 
      <Mcard {...props}/>
  );
}

export default AutoTable;